
# 判断是否存在文件
$databases_file_path="$PSScriptRoot\databases.ps1"
# echo "[Info] databases_file_path = $databases_file_path" 
$TRUE_FALSE=(Test-Path $databases_file_path)
if($TRUE_FALSE -eq "True")
{
    # 文件已经存在
    # echo "[Info] $databases_file_path" 
    . "$PSScriptRoot\databases.ps1"
} else {
	. "$PSScriptRoot\databases-example.ps1"
}

function _list() {
    foreach($item in $server_lists)
    {
        $item[0]
        # $item[1]
    }
}


function _index($input1) {
    $index = 0
    foreach($item in $server_lists)
    {
        if($item[0] -eq $input1){
            #echo "$item"
            echo "$index"
            break;
        } else {
            $index = $index + 1
        }
    }
}
